<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div {
      width: 200px;
      height: 200px;
      background-color: red;
      /* 过渡 */
      transition: all 1s;
    }

    div:hover {
      width: 800px;
      /* width: 200px; */
      /* background-color: yellow; */
    }

  </style>
</head>
<body>
  <div></div>
</body>
</html>